package com.sh.data.engine.domain.datadev.flink.model.domain;

import lombok.Data;
import org.apache.commons.lang3.StringUtils;

/**
 * @author: zigui.zdf
 * @description:
 * @date: 2021/6/8 17:26
 */
@Data
public class FlinkFieldDomain {

    private String field;

    private String type;

    public String getType() {
        if (StringUtils.isNotBlank(type) && type.toLowerCase().startsWith("varchar")) {
            return "STRING";
        }

        return type;
    }

    /**
     * 目前只限hbase使用
     */
    private String columnFamily;

    /**
     * 前端在配置hbase结果表的column时候,如果是row key是不隶属任何的column family的
     */
    public static final String DUMMY_COLUMN_FAMILY_NAME = "DUMMY_COLUMN_FAMILY_NAME";

    private Integer isPartition;
}
